package com.cgwx.commonutils.struc;

/**
 * @author GaoWei
 * @Date 2021/8/6 - 10:57
 */
public class Stack extends LinkedList
{
    public Object peek()
    {
        if (this.head == null) {
            return null;
        }
        return this.head.userObject;
    }

    public Object pop()
    {
        return removeHead();
    }

    public void push(Object o)
    {
        addToHead(o);
    }
}
